package com.ym.medical.domain.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ym.base.enums.FlagEnum;
import com.ym.medical.enums.CodeRuleTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 编码生产对象 sys_code_rule
 *
 * @author ym
 * @date 2020-08-17
 */
@ApiModel("编码生产-列表")
@Data
public class SysCodeRuleListPcVO implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty("主键")
	private Long id;

	@ApiModelProperty("规则名称")
	private String ruleName;

	@ApiModelProperty("规则编码")
	private String ruleCode;

	@ApiModelProperty("编码前缀")
	private String codePrefix;

	@ApiModelProperty("序列长度")
	private Integer serialLength;

	@ApiModelProperty("索引值")
	private Long serial;

	@ApiModelProperty("日期格式化")
	private String curFormatVal;

	@ApiModelProperty("日期格式化格式,如yyyyMM")
	private String format;

	@ApiModelProperty("编码类型(1日期+随机数;2日期+递增序列.;3递增序列;)")
	@JsonSerialize(converter = CodeRuleTypeEnum.Covert.class)
	private String formatType;

	@ApiModelProperty("创建人")
	private Long creater;

	@ApiModelProperty("创建时间")
	private Date createtime;

	@ApiModelProperty("删除标志")
	@JsonSerialize(converter = FlagEnum.Covert.class)
	private String deleted;

}
